gtk/range: Move button release handling to GtkGestureDrag
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 11 Dec 2020 15:22:26 +0000 (16:22 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 12 Dec 2020 00:42:42 +0000 (01:42 +0100)
commit7a4d15dc6799ba94388dfd598b5ad2401dfa90b7
treefbaad3d6b3297449264a6c911b5f2767f46e004f
parente4d8d50a8b724a159407183bafa6109c9d8a21e2
gtk/range: Move button release handling to GtkGestureDrag

Tracking it through the GtkGestureClick becomes a bit cumbersome for
handling of simultaneously pressed buttons. We can track ::stopped,
but that also emits for a number of situations where we want drag to
continue.

However, the GtkGestureDrag is grouped with the click gesture, and
knows better when to finish the drag gesture (not just because of a
button release), so hook drag and zoom mode finalization there.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
gtk/gtkrange.c